package cn.com.dbappsecurity.frame.scanner;

import java.lang.reflect.Method;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import lombok.Data;
import cn.com.dbappsecurity.frame.paramparse.IParamParse;

/**
 * 保存controller方法信息
 * @author dhz
 */
@Data
public class Actions {

	private Method method;
	private List<IParamParse> params;
	private double maxLen = -1;
	
	public Object[] assemParam(HttpServletRequest request,HttpServletResponse response) throws Exception{
		Object[] args = null;
		if(params != null){
			args = new Object[params.size()];
			for(int i=0;i<params.size();i++){
				IParamParse p = params.get(i);
				if(p != null){
					args[i] = p.getParamter(request,response);
				}
			}
		}
		return args;
	}
	
}
